import request from "@/utils/request";

// 查询地址管理列表
export function listLocations(query) {
  return request({
    url: "/admin/assets/locations/",
    method: "get",
    params: query
  });
}

// 查询地址管理详细
export function getLocations(id) {
  return request({
    url: "/admin/assets/locations/" + id + "/",
    method: "get"
  });
}

// 新增地址管理
export function addLocations(data) {
  return request({
    url: "/admin/assets/locations/",
    method: "post",
    data: data
  });
}

// 修改地址管理
export function updateLocations(data) {
  return request({
    url: "/admin/assets/locations/" + data.id + "/",
    method: "put",
    data: data
  });
}

// 删除地址管理
export function delLocations(id) {
  return request({
    url: "/admin/assets/locations/" + id + "/",
    method: "delete"
  });
}

// 导出地址管理
export function exportLocations(query) {
  return request({
    url: "/admin/assets/locations/export/",
    method: "get",
    params: query
  });
}
export function importsLocations(data) {
  return request({
    url: "/admin/assets/locations/importTemplate/",
    method: "post",
    data: data
  });
}
